{% extends "../base.html" %}

{% block body %}
  <div class='container'>
    <ul>
      {% for e in entries %}
        <li>
          <a href="{{ '/entry/show/%s' % e['_id'] }}">{{ e['title'] }}</a>
        </li>
      {% end %}
    </ul>

    <div class="pager">
      <ul>
        {% if page > 1 %}
          <li class="pager previous"><a href={{ '/auth/%s%s' % (current_user['_id'], '?page={}'.format(page - 1) if page > 2 else '') }}>&laquo;</a></li>
        {% end %}
          <li class="pager">第 {{ page }} 页</li>
        {% if page < last %}
          <li class="pager next"><a href={{ '/auth/%s%s' % (current_user['_id'], '?page={}'.format(page + 1)) }}>&raquo;</a></li>
        {% end %}
      </ul>
    </div>
  </div>
  {% module xsrf_form_html() %}
{% end %}
